﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WinFormsAppTest.Dao;
using WinFormsAppTest.pojo;

namespace WinFormsAppTest.Service
{
    internal class OvertimeService
    {

        public List<Overtime> GetOvertimes()
        {
            OvertimeDao Overtimedao = new OvertimeDao();
            List<Overtime> Overtime = Overtimedao.GetOvertimes();
            return Overtime; 
        }

        //根据用户id进行搜索
        public List<Overtime> GetOvertimeByUserId(int id)
        {
            OvertimeDao Overtimedao = new OvertimeDao();
            List<Overtime> Overtime = Overtimedao.GetOvertimeByUserId(id);
            return Overtime;
        }

        //根据档案id进行搜索
        public List<Overtime> GetOvertimeById(int id)
        {
            OvertimeDao Overtimedao = new OvertimeDao();
            List<Overtime> Overtime = Overtimedao.GetOvertimeById(id);
            return Overtime;
        }

        public List<Overtime> GetOvertimeByTime(DateTime begintime)
        {
            OvertimeDao Overtimedao = new OvertimeDao();
            List<Overtime> Overtime = Overtimedao.GetOvertimeByTime(begintime);
            return Overtime;
        }
    }
}
